﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Media.Imaging;

namespace AzukiMap.Renderer.Raster.Filter
{
    public class TransparentColorFilter
    {
        private WriteableBitmap _writableBitmap;

        public TransparentColorFilter()
        {
            
        }

        public ImageSource GetImage(Uri sourceUri)
        {
            var source = new BitmapImage();
            source.CreateOptions = BitmapCreateOptions.None;
            source.ImageOpened += new EventHandler<RoutedEventArgs>(source_ImageOpened);
            source.ImageFailed += new EventHandler<ExceptionRoutedEventArgs>(source_ImageFailed);

            _writableBitmap = new WriteableBitmap(source);

            return _writableBitmap;
        }

        
        void source_ImageOpened(object sender, RoutedEventArgs e)
        {
            EditableImage image = new EditableImage();
            _writableBitmap.Pixels;

        }

        void source_ImageFailed(object sender, ExceptionRoutedEventArgs e)
        {
            throw new NotImplementedException();
        }

    }
}
